#删除原容器
echo "begin stop and delete old redis......"
docker stop redis-cqj && docker rm redis-cqj
echo "=======================rm over=============================="

# pull mysql redis
echo "=======================start pull redis images=============================="
docker pull redis
echo "=======================pull end.=============================="
# check path
redis_path="/home/docker/redis"
if [[ ! -d "$redis_path" ]]; then
	echo "redis_path not exsits,create now."
	mkdir -p ${redis_path}
else
	echo "redis_path path exsits"
fi

docker run -d \
--network=bridge-chen \
--ip 172.20.1.15 \
-p 6379:6379 \
-v /home/docker/redis/data:/data \
--restart=always \
--privileged=true \
--name redis-cqj \
redis:latest
